﻿using Clover.BaseAuth;
using Clover.BaseAuth.Demo;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            Stopwatch stopwatch = new Stopwatch();


            new PermissionAttribute(Permission.Home, Permission.Test, Permission.View, Permission.View, Permission.Home);
            new CustomPermissionAttribute(Permission.Home, Permission.Test, Permission.View, Permission.View, Permission.Home);

            stopwatch.Start();
            for (int i = 0; i < 1000000; i++)
            {
                new PermissionAttribute(Permission.Home, Permission.Test, Permission.View, Permission.View, Permission.Home);
            }
            stopwatch.Stop();
            Console.WriteLine(stopwatch.ElapsedMilliseconds / 1000000M);

            stopwatch.Reset();


            stopwatch.Start();


            for (int i = 0; i < 1000000; i++)
            {
                new CustomPermissionAttribute(Permission.Home, Permission.Test, Permission.View, Permission.View, Permission.Home);
            }
            stopwatch.Stop();
            Console.WriteLine(stopwatch.ElapsedMilliseconds / 1000000M);
            Console.ReadLine();
        }

    }
}
